windCharacter={
	characters:{
		xiahouyuan:['male','wei',4,['shensu1','shensu2','shensu3']],
		caoren:['male','wei',4,['jushou']],
		huangzhong:['male','shu',4,['liegong']],
		weiyan:['male','shu',4,['kuanggu']],
		xiaoqiao:['female','wu',3,['tianxiang','hongyan']],
		zhoutai:['male','wu',4,['buqu']],
		zhangjiao:['male','qun',3,['leiji','guidao']],
		yuji:['male','qun',3,['guhuo']],
	},
	skills:{
		shensu1:{
			can_trigger:'PhaseDrawBefore',
			content:function(step){
				switch(step){
					case 0:
					addTempSkill('shensu3');
					AskForTarget(api.canUseSha);
					break;

					case 1:
					if(evt.result.bool){
						UseCard(evt.result.targets[0],'sha');
						addSkip('PhaseDraw');
					}
					Discard(evt.result.cards);
					finish();
				}
			}
		},
		shensu2:{
			will_trigger:'PhaseUseBefore',
			trigger_prompt:false,
			content:function(step){
				switch(step){
					case 0:
					Ask({
						filter_card:filter.card.isEquip,
						select_card:1,
						filter_target:api.canUseSha,
						select_target:1
					});
					openPrompt('是否发动技能【神速】？')
					break;

					case 1:
					if(evt.result.bool==false){
						finish();
						return;
					}
					openPrompt(get.name(evt.player)+'发动了技能【神速】');
					delay(2);
					break;

					case 2:
					closePrompt();
					addTempSkill('shensu3');
					UseCard(evt.result.targets[0],'sha');
					addSkip('PhaseUse');
					finish();
				}
			}
		},
		shensu3:{
			mod:{
				type:'distance',
				content:{
					attack_from:-99
				}
			}
		},
		jushou:{
			can_trigger:'PhaseEnd',
			content:function(){
				Flip();
				DrawCards(3);
			}
		},
		liegong:{
			can_trigger:'ShaBegin',
			filter:function(player,event){
				if(player!=event.player) return false;
				if(player.hp<=evt.player.handcards.length) return true;
				if(get.attack_distance(player)>=evt.player.handcards.length) return true;
				return false;
			},
			content:function(){
				api.directHit();
			}
		},
		kuanggu:{
			will_trigger:'DamageEnd',
			filter:function(player,event){
				if(player!=event.source) return false;
				if(player.hp>=player.max_hp) return false;
				return (canAttack(player,event.player));
			},
			content:function(){
				Recover(evt.evt.num);
			}
		},
		tianxiang:{
			will_trigger:'DamageBefore',
			trigger_prompt:false,
			content:function(step){
				switch(step){
					case 0:
					Ask({
						filter_card:'heart',
						select_card:1,
						filter_target:filter.target.others,
						select_target:1,
						prompt:'天香：弃置一张红桃牌将伤害转移至任意一名其他角色，然后该角色摸等同于已损失体力值的牌'
					});
					break;

					case 1:
					if(evt.result.bool==false){
						finish();
						return;
					}
					Discard(evt.result.cards);
					evt.evt.player=evt.result.targets[0];
					evt.evt.marks.push('tianxiang');
					addTempSkill(evt.result.targets[0],'tianxiang2',2);
					finish();
				}
			}
		},
		tianxiang2:{
			will_trigger:'DamageAfter',
			trigger_prompt:false,
			content:function(){
				DrawCards(evt.player.max_hp-evt.player.hp,true);
			}
		},
		hongyan:{
			mod:{
				type:'suit',
				content:{
					spade:'heart'
				}
			}
		},
		buqu:{
			can_trigger:'DieBefore',
			content:function(step){
				switch(step){
					case 0:
					AddSpecial(getCards(1),'buqu');
					break;

					case 1:
					openPrompt(get.name(evt.player)+'的不屈牌',evt.player.special.buqu);
					delay(2);
					break;

					case 2:
					var cards=evt.player.special.buqu;
					var repeated=false;
					for(var i in cards){
						for(var j in cards){
							if(i!=j&&get.number(cards[i])==get.number(cards[j])){
								repeated=true;
								break;
							}
						}
						if(repeated)
							break;
					}
					if(repeated==false){
						addSkip('Die');
						evt.player.hp=0;
					}
					finish();
				}
			}
		},
		leiji:{
			will_trigger:'Respond',
			trigger_prompt:false,
			filter:function(player,event){
				if(player!=event.player) return false;
				return (event.card.name=='shan');
			},
			content:function(step){
				switch(step){
					case 0:
					AskForTarget(filter.target.others,'雷击：选择一名角色进行一次判定，若结果为黑桃则受到两点雷属性伤害');
					break;

					case 1:
					if(evt.result.bool==false){
						finish();
						return;
					}
					evt.target=evt.result.targets[0]
					Judge(evt.target,{good:'spade'});
					break;

					case 2:
					if(evt.result.bool){
						Damage(2,'thunder');
					}
					finish();
				}
			}
		},
		guidao:{
			will_trigger:'JudgeBefore',
			trigger_prompt:false,
			filter:true,
			content:function(step){
				switch(step){
					case 0:
					Ask({
						filter_card:'black',
						select_card:1,
						prompt:['鬼道：选择要替换的牌',evt.evt.card]
					})
					break;

					case 1:
					if(evt.result.bool){
						LoseCards(evt.result.cards);
						GainCards(evt.evt.card);
						evt.evt.card=evt.result.cards[0];
						openPrompt(get.name(evt.player)+'发动鬼道',evt.result.cards[0]);
						delay(2);
					}
					break;

					default:
					finish();
				}
			}
		},
		guhuo:{
			can_trigger:'PhaseUseBefore',
			filter:function(player,event){
				if(player!=game.me) return false;
				if(player!=event.player) return false;
				return true;
			},
			auto_confirm:true,
			content:function(step){
				switch(step){
					case 0:
					pause();
					setTimeout(function() {resume()}, 3000);
					evt.name='guhuo';
					evt.str='&nbsp;';
					openPrompt('准备');
					break;

					case 1:
					openPrompt('&nbsp;',getCards(4));
					evt.click=function(){
						if(this.dataset.select==0) return;
						this.dataset.select=0
						evt.str+=this.link.number.toString();
						changeCaption(evt.str);
					}
					for(var i in ui.dialog.current.buttons){
						var button=ui.dialog.current.buttons[i];
						button.dataset.select=1;
						button.addEventListener('click',evt.click);
					}
					evt.timer=setTimeout(function() {if(evt.name=='guhuo') clickConfirm('ok')}, 24000);
					break;

					case 2:
					openConfirm('加','减','乘','除','【','】','no','yes');
					changeCaption(evt.str);
					pause();
					break;

					case 3:
					if(evt.return.bool){
						clearTimeout(evt.timer);
						goto(4);
						return;
					}
					if(evt.return.confirm=='no'){
						for(var i in ui.dialog.current.buttons)
							ui.dialog.current.buttons[i].dataset.select=1;
						evt.str='&nbsp;';
					}
					else
						evt.str+=evt.return.confirm;
					goto(2);
					break;

					case 4:
					var str='';
					for(var i=6;i<evt.str.length;i++){
						if(evt.str[i]=='加') str+='+';
						else if(evt.str[i]=='减') str+='-';
						else if(evt.str[i]=='乘') str+='*';
						else if(evt.str[i]=='除') str+='/';
						else if(evt.str[i]=='【') str+='(';
						else if(evt.str[i]=='】') str+=')';
						else str+=evt.str[i];
					}
					if(api.checkMath(str)&&eval(str)==24){
						var cards=new Array();
						for(var i in ui.dialog.current.buttons){
							if(ui.dialog.current.buttons[i].dataset.select==0)
								cards.push(ui.dialog.current.buttons[i].link);
						}

					}
						GainCards(cards);
					break;

					default:
					throwTemp();
					finish();
				}
			}
		}
	},
	translate:{
		xiahouyuan:'夏侯渊',
		caoren:'曹仁',
		huangzhong:'黄忠',
		weiyan:'魏延',
		xiaoqiao:'小乔',
		zhoutai:'周泰',
		zhangjiao:'张角',
		yuji:'于吉',
		shensu1:'神速',
		shensu2:'神速',
		jushou:'据守',
		liegong:'烈弓',
		kuanggu:'狂骨',
		tianxiang:'天香',
		hongyan:'红颜',
		buqu:'不屈',
		leiji:'雷击',
		guidao:'鬼道',
		guhuo:'蛊惑'
	},
	api:{
		checkMath:function(str){
			var bracket=0;
			for(var i=0;i<str.length;i++){
				if(str[i]=='(') bracket++;
				else if(str[i]==')') bracket--;
				if(bracket<0) return false;
			}
			if(bracket!=0) return false;
			if(/[0-9]|[(]/.test(str[0])==false) return false;
			if(/[0-9]|[)]/.test(str[str.length-1])==false) return false;
			for(var i=0;i<str.length-1;i++){
				var str2=str.slice(i,i+2);
				if(/[0-9]/.test(str2)==false){
					if(str2[0]=='('){
						if(str2[1]!='('&&str2[1]!=')') return false;
					}
					if(str2[1]==')'){
						if(str2[0]!='('&&str2[0]!=')') return false;
					}
					if(/[()]/.test(str2)==false) return false;
				}
			}
			return true;
		}
	}
}